<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

<%@page import="com.enjava.ComentarioChat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>hello World</title>
</head>
<body>
<h1>Chat spring JPA</h1>


<div id="chatDiv" style="position: absolute;width: 500px; height: 500px; top: 100px;left: 50px; border:1px solid #000">


                
  <c:forEach items="${comentarios}" var="comentario">  
          
    ${comentario.fecha} ${comentario.usuario.nombre} ${comentario.texto} 

    <br></br>

              
   </c:forEach>
              
</div>


<div id="usuariosDiv" style="position: absolute;width: 200px; height: 500px; top: 100px;left: 600px; border:1px solid #000">


 <c:forEach items="${usuariosConectados}" var="usuario">  
          
    ${usuario.nombre}

    <br></br>

              
   </c:forEach>
   

</div>


<div id="formularioDiv" style="position: absolute;width: 750px; height: 100px; top: 620px;left: 50px; border:1px solid #000">

<form action="./mensajeRecibido" method="GET">
Escribe aqui: <input type='text' name= 'mensaje'> 
<input type='submit' value='Enviar'> </form>
				       
</div>



</body>
</html>